# Assign user organizational units

This endpoint adds or updates the organizational units (structure levels)
that a user is allowed to access within the organization.

Behavior:

- Accepts a list of organizational unit identifiers in the request body
- Persists user-to-organization access via the identity management service
- Returns the updated list of organizational units assigned to the user

Endpoint: POST /api/v1/users/{userId}/organization/structure/units

## Path parameters:

  - `userId` (string, required)

## Request fields (application/json-patch+json):

  - `orgUnitIds` (array,null)

## Response 200 fields (text/plain):

  - `data` (array,null)

  - `data.accountOrgUnitId` (string)

  - `data.levelOrdinal` (integer)

  - `data.accountOrgUnitName` (string,null)

  - `data.accountOrgUnitCode` (string,null)

  - `data.parentAccountOrgUnitId` (string,null)

  - `data.subLevelUnits` (array,null)

  - `message` (string,null)

  - `isError` (boolean)

  - `messageCode` (integer)

  - `status` (string,null)

  - `errorType` (string,null)

  - `traceid` (string,null)

  - `responseDescription` (string,null)


